package main;

import station.CommunicationModule;
import station.DataSink;
import station.DataSource;

public class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		
		if (args.length == 9) {
			String team		= args[0]; // team-number
			String station	= args[1]; // station-number
			String msg		= args[2]; // message
			String multiAdd = args[3]; // multicast-address
			int multiPort	= Integer.parseInt(args[4]); // multicast-port
			int dsoPort		= Integer.parseInt(args[5]); // datasource-port
			int intervall	= Integer.parseInt(args[6]); // datasource-send-intervall 
			String netintf	= args[7]; // network-interface
			int dsiPort		= Integer.parseInt(args[8]); // datasink-port 

			new DataSink(dsiPort);
			new CommunicationModule(dsoPort, dsiPort, multiAdd, multiPort, netintf);
			new DataSource(dsoPort, team, station, msg, intervall);

			
			
		} else {
			System.out.println("Usage: main.Main <team> <station> <message> <multicast-address> <multicast-port> <datasource-port> <datasource-intervall> <network-interface> <datasink-port>\n");
		}
		
	}

}
